package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.cucc.service.attr.LocalAttrHelper;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

import java.util.Objects;

public class ModuleFeeAttrHander extends AbstractAttrHandler<KiteInst, AttrData> {

    @Override
    public void set(KiteAttr attr, KiteInst inst, String value, AttrData data) {
        super.set(attr, inst, value, data);
        //标签类型,
        KiteAttr enterPriseSelfPurchaseAttr = inst.getAttr("200001033");
        if (Objects.nonNull(enterPriseSelfPurchaseAttr)) {
            //如果是个性标签，模型费展示且必填
            if ("100000732".equals(enterPriseSelfPurchaseAttr.getValue())) {
                LocalAttrHelper.showAndNotNull(inst, "200001034");
            }else {
                LocalAttrHelper.hideAndNullable(inst,"200001034");
            }
        }

    }
}
